import os
from celery import Celery

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meiduo_mall.settings")
# 创建celery实例
celery_app = Celery('celery_tasks')
celery_app.config_from_object('celery_tasks.config')
# 自动注册任务
celery_app.autodiscover_tasks(['celery_tasks.sms'])